<?php if(is_array($items) && !empty($items)){?>
<?php foreach ($items as $key => $news) {?>
<table class="calendar-news" cellpadding="0" cellspacing="4" >
  <tr>
    <td class="image" valign="top">
    	<?php $thumb = $this->Html->url('/', true).str_replace(' ',"%20",$fileUpload->image($news['NewUpload']['name'],array('autoResize'=>true,'width'=>100,'imagePathOnly'=>true)));?>
		<?php echo $this->Html->link("&nbsp;", array('plugin'=>'calendar','controller'=>'news','action' => 'view', $news['News']['id'],Inflector::slug($news['News']['name'],'-')),array('escape'=>false,'class'=>"highslide", 'title'=>$news['News']['name'], 'style'=>"background: url(".$thumb.") center no-repeat;")); ?>    	
    </td>
    <td valign="top">
    	<strong><?php echo nl2br($news['News']['name'])?></strong><br/>
    	<?php $content = $this->Text->truncate(
			    $news['News']['small_content'],
			    100,
			    array(
			        'ending' => '...',
			        'exact' => false
			    ));?>
    	<?php echo nl2br($content)?><br/>
    	<?php echo $this->Html->link(__d('calendar','więcej...',true),array('plugin'=>'calendar','controller'=>'news','action'=>'view',$news['News']['id']),array('class'=>'link-more'));?>
    		
    </td>
  </tr>
</table>

<?php }?>
<br/><br/>
<?php echo $html->link(__d('calendar','Pełna lista nowości',true),array('plugin'=>'calendar','controller'=>'news','action'=>'display'))?>
<?php }?>
